Skip to content

Comments

Enable test harness support for gloas block production & import#8844

Draft
jimmygchen wants to merge 9 commits intosigp:unstablefrom
jimmygchen:feat-gloas-test-harness
Draft

Enable test harness support for gloas block production & import#8844
jimmygchen wants to merge 9 commits intosigp:unstablefrom
jimmygchen:feat-gloas-test-harness

Conversation

@jimmygchen
Copy link
Member

@jimmygchen jimmygchen commented Feb 18, 2026

Description

Enables the test harness to produce and import gloas blocks, getting check_all_blocks_from_altair_to_gloas passing. Builds on #8754.

Production changes (~75 lines)

File Change
block_verification.rs Simulate minimal envelope effects after state root check: set latest_block_hash from bid, cache state_root in latest_block_header.
block_verification.rs Skip load_parent state root sanity check for gloas.
block_replayer.rs Same envelope simulation for state replay.
execution_payload.rs PayloadNotifier::new returns Irrelevant for gloas.
gloas.rs / produce_block.rs BlockProductionResult returns BeaconState and Option<ExecutionPayloadEnvelope>.

Test harness / test changes (~600 lines)

  • make_block and add_block_at_slot wired up for gloas block production and envelope processing.
  • Tests needing pre-gloas payload/column mechanics skipped with TODO(EIP-7732) + Gloas TODO tracking issue #8590.

Additional Info

The block import path workarounds are needed because blocks are always imported before envelopes in gloas. Independent of and compatible with the envelope processing pipeline in #8806.

@jimmygchen jimmygchen added the work-in-progress PR is a work-in-progress label Feb 18, 2026
@jimmygchen jimmygchen marked this pull request as ready for review February 20, 2026 06:51
@jimmygchen jimmygchen requested a review from jxs as a code owner February 20, 2026 06:51
Comment on lines +267 to +288
// TODO(gloas): Replace with full process_execution_payload_envelope once
// available in the replay path. This workaround is needed because replay
// doesn't have access to envelopes, only blocks.
// https://github.com/sigp/lighthouse/issues/8590
//
// For gloas blocks, simulate the minimal effects of
// process_execution_payload_envelope that are needed for subsequent block
// processing:
// 1. Set latest_block_hash from the bid so the next block's bid verification
// passes.
// 2. Cache the block's state_root in latest_block_header so that
// per_slot_processing's cache_state uses it (instead of recomputing from
// tree hash, which would reflect the latest_block_hash change and produce
// an incorrect state_roots entry).
if let Ok(bid) = block.message().body().signed_execution_payload_bid() {
if let Ok(latest_block_hash) = self.state.latest_block_hash_mut() {
*latest_block_hash = bid.message.block_hash;
}
if self.state.latest_block_header().state_root == Hash256::zero() {
self.state.latest_block_header_mut().state_root = block.state_root();
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to work on a cleaned up version of this for:

In general it seems like the "prod changes" in this PR are mostly hacks, it might be better to plug these holes before merging stuff we know is definitely wrong?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By plugging holes, I mean, work on the proper versions of these checks + features, then update the test harness.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes agree, i haven't got a chance to review this myself, just wanted to get an idea how big of a change this requires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas test improvement Improve tests work-in-progress PR is a work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants